/******************************************************************************
COPYRIGHT 2012   : ATECH
Project          : 
Source File Name : driverSPI.h
Group            : SoftWare Team
Author           : 
Date First Issued: 10/26/2012
********************************Documentation**********************************
Purpose -  This file is 
********************************RevisionHistory********************************
_______________________________________________________________________________
Date : MM/DD/YY    Release        Changes Description                  Author
Date : 10/26/2012    1.0                                                 
   
******************************************************************************/

#ifndef driverSPI_h
#define driverSPI_h


/* #include */

/* #define */

/* macros */

#define ERR_OK           0           
#define ERR_RXEMPTY      10            /* No data in receiver. */
#define ERR_TXFULL       11            /* Transmitter is full. */


/* typedef */

/* Class definitions */

/* Function prototypes */
void ini_SPI(void);
void DisableSPI(void);
void Sleep_SPI(void);
void Wake_SPI(void);
byte SPI_RecvChar(UINT16 *Chr);
byte SPI_RecvCharBy8Bit(UINT8 *Chr);
byte SPI_SendChar(UINT16 Chr);
byte SPI_SendCharBy8Bit(UINT8 Chr);
UINT8 SPI_DataComBy8Bit( UINT8 u8_send_data, UINT8 *p_u8_rec_data );
UINT8 SPI_DataCom( UINT16 u16_send_data, UINT16 *p_u16_rec_data );

/*************************end of driverSPI.h**********************************/
#endif



/******************************************************************************
 Revision Notes:

For each change to this file, be sure to record:
1. Who made the change and when the change was made.
2. Why the change was made and the intended result.

  Date     By     Reason For Change
mm/dd/yy  XXX     -----------------

******************************************************************************/